The most sensitive measurements of the electron electric dipole moment d_e have previously been made using heavy atoms. Heavy polar molecules offer a greater sensitivity to d_e because the interaction energy to be measured is typically 10^3 times larger than in a heavy atom. We report the first measurement of this kind, for which we have used the molecule YbF. Together, the large interaction energy and the strong tensor polarizability of the molecule make our experiment essentially free of the systematic errors that currently limit d_e measurements in atoms. Our first result d_e = (- 0.2 \pm 3.2) x 10^-26 e.cm is less sensitive than the best atom measurement, but is limited only by counting statistics and demonstrates the power of the method.